package com.apotik.legenda.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="apt_sales_trx")
public class SalesTrx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="sales_trx_id")
	private Long salesTrxId;
	
	@Column(name="trx_code", length=50, unique=true, nullable=false)
	private String trxCode;
	
	@Column(name="trx_type", length=10)
	private String trxType;
	
	@Column(name="shift_name", length=20, nullable=false)
	private String shiftName;
	
	@Column(name="shift_time", length=100, nullable=false)
	private String shiftTime;
	
	@ManyToOne
	@JoinColumn(name="doctor")
	private Doctor doctor;
	
	@ManyToOne
	@JoinColumn(name="customer")
	private Customer customer;
	
	@Column(name="asuransi_from", length=100)
	private String asuransiFrom;
	
	@Column(name="card_from")
	private String cardFrom;
	
	@Column(name="payment_by", length=10)
	private String paymentBy;
	
	@Column(name="payment_status", length=5, nullable=false)
	private String paymentStatus;
	
	@Column(name="amount_sales_obat")
	private BigDecimal amountSalesObat;
	
	@Column(name="obat_discount", length=5)
	private int obatDiscount;
	
	@Column(name="amount_obat_discount")
	private BigDecimal amountObatDiscount;
	
	@Column(name="obat_up_asr", length=5)
	private int obatUpAsr;
	
	@Column(name="amount_obat_up_asr")
	private BigDecimal amountObatUpAsr;
	
	@Column(name="amount_dokter_service")
	private BigDecimal amountDokterService;
	
	@Column(name="amount_medical_treatment")
	private BigDecimal amountMedicalTreatment;
	
	@Column(name="amount_lab_service")
	private BigDecimal amountLabService;
	
	@Column(name="amount_administration")
	private BigDecimal amountAdministration;
	
	@Column(name="amount_ru")
	private BigDecimal amountRU;
	
	@Column(name="amount_misc")
	private BigDecimal amountMisc;
	
	@Column(name="amount_trx", nullable=false)
	private BigDecimal amountTrx;
	
	@Column(name="amount_refund")
	private BigDecimal amountRefund;
	
	@Column(name="created_date", nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createdDate;
	
	@Column(name="updated_date")
	@Temporal(TemporalType.TIMESTAMP)
	private Date updatedDate;
	
	@ManyToOne
	@JoinColumn(name="created_by", nullable=false)
	private User createdBy;
	
	@ManyToOne
	@JoinColumn(name="updated_by")
	private User updatedBy;

	
	
	public Long getSalesTrxId() {
		return salesTrxId;
	}

	public void setSalesTrxId(Long salesTrxId) {
		this.salesTrxId = salesTrxId;
	}

	public String getTrxCode() {
		return trxCode;
	}

	public void setTrxCode(String trxCode) {
		this.trxCode = trxCode;
	}

	public String getTrxType() {
		return trxType;
	}

	public void setTrxType(String trxType) {
		this.trxType = trxType;
	}

	public String getShiftName() {
		return shiftName;
	}

	public void setShiftName(String shiftName) {
		this.shiftName = shiftName;
	}

	public String getShiftTime() {
		return shiftTime;
	}

	public void setShiftTime(String shiftTime) {
		this.shiftTime = shiftTime;
	}

	public Doctor getDoctor() {
		return doctor;
	}

	public void setDoctor(Doctor doctor) {
		this.doctor = doctor;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getAsuransiFrom() {
		return asuransiFrom;
	}

	public void setAsuransiFrom(String asuransiFrom) {
		this.asuransiFrom = asuransiFrom;
	}
	
	public String getCardFrom() {
		return cardFrom;
	}
	
	public void setCardFrom(String cardFrom) {
		this.cardFrom = cardFrom;
	}

	public String getPaymentBy() {
		return paymentBy;
	}

	public void setPaymentBy(String paymentBy) {
		this.paymentBy = paymentBy;
	}

	public String getPaymentStatus() {
		return paymentStatus;
	}

	public void setPaymentStatus(String paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	public BigDecimal getAmountSalesObat() {
		return amountSalesObat;
	}

	public void setAmountSalesObat(BigDecimal amountSalesObat) {
		this.amountSalesObat = amountSalesObat;
	}

	public int getObatDiscount() {
		return obatDiscount;
	}

	public void setObatDiscount(int obatDiscount) {
		this.obatDiscount = obatDiscount;
	}

	public BigDecimal getAmountObatDiscount() {
		return amountObatDiscount;
	}

	public void setAmountObatDiscount(BigDecimal amountObatDiscount) {
		this.amountObatDiscount = amountObatDiscount;
	}

	public int getObatUpAsr() {
		return obatUpAsr;
	}

	public void setObatUpAsr(int obatUpAsr) {
		this.obatUpAsr = obatUpAsr;
	}

	public BigDecimal getAmountObatUpAsr() {
		return amountObatUpAsr;
	}

	public void setAmountObatUpAsr(BigDecimal amountObatUpAsr) {
		this.amountObatUpAsr = amountObatUpAsr;
	}

	public BigDecimal getAmountDokterService() {
		return amountDokterService;
	}

	public void setAmountDokterService(BigDecimal amountDokterService) {
		this.amountDokterService = amountDokterService;
	}

	public BigDecimal getAmountMedicalTreatment() {
		return amountMedicalTreatment;
	}

	public void setAmountMedicalTreatment(BigDecimal amountMedicalTreatment) {
		this.amountMedicalTreatment = amountMedicalTreatment;
	}

	public BigDecimal getAmountLabService() {
		return amountLabService;
	}

	public void setAmountLabService(BigDecimal amountLabService) {
		this.amountLabService = amountLabService;
	}

	public BigDecimal getAmountAdministration() {
		return amountAdministration;
	}

	public void setAmountAdministration(BigDecimal amountAdministration) {
		this.amountAdministration = amountAdministration;
	}

	public BigDecimal getAmountRU() {
		return amountRU;
	}

	public void setAmountRU(BigDecimal amountRU) {
		this.amountRU = amountRU;
	}

	public BigDecimal getAmountMisc() {
		return amountMisc;
	}

	public void setAmountMisc(BigDecimal amountMisc) {
		this.amountMisc = amountMisc;
	}

	public BigDecimal getAmountTrx() {
		return amountTrx;
	}

	public void setAmountTrx(BigDecimal amountTrx) {
		this.amountTrx = amountTrx;
	}

	public BigDecimal getAmountRefund() {
		return amountRefund;
	}

	public void setAmountRefund(BigDecimal amountRefund) {
		this.amountRefund = amountRefund;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public User getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(User updatedBy) {
		this.updatedBy = updatedBy;
	}

}
